class save_as_menu :
    def __init__ ( self , mediator ) :
        self . _awake = False
        self . _mediator = mediator
        self . _entry_text_in_browser = None
    def entry_text_in_browser_reply ( self , text ) :
        self . _entry_text_in_browser = text
    def show_save_as_menu ( self ) :
        self . _awake = True
        self . _mediator . configure_title_text_for_browser ( self . _mediator . localization_save_as_menu_title ( ) )
        self . _mediator . configure_action_text_for_browser ( self . _mediator . localization_save_as_menu_save ( ) )
        self . _mediator . configure_action_title_name_text_for_browser ( self . _mediator . localization_save_as_menu_new_name ( ) )
        self . _mediator . configure_only_unique_names_mode_for_browser ( self . _mediator . localization_save_as_menu_already_exists ( ) )
        self . _mediator . configure_title_text_when_no_entries_for_browser ( self . _mediator . localization_save_as_menu_title ( ) )
        self . _mediator . configure_keep_action_part_when_no_entries_for_browser ( )
        self . _mediator . show_browser ( )
    def hide_save_as_menu ( self ) :
        self . _awake = False
        self . _mediator . hide_browser ( )
    def on_browser_return ( self ) :
        if self . _awake :
            self . _mediator . on_save_as_menu_return ( )
    def on_browser_action ( self ) :
        if self . _awake :
            self . _mediator . entry_text_in_browser_request ( )
            self . _mediator . on_save_as_menu_base_saved ( self . _entry_text_in_browser )
